#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int a;
    cin >> a;
    double sum = 0;
    if (a <= 150)
    {
        sum += a * 0.4463;
    }
    else if (a > 150 && a < 400)
    {
        sum += 0.4463 * 150 + (a - 150) * 0.4663;
    }
    else
    {
        sum += 0.4463 * 150 + 0.4663 * 250 + (a - 400) * 0.5663;
    }
    printf("%.1f", sum);
}